<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .movearea {
            /* background-color: blueviolet; */
            position: absolute;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            padding: 6vmin;
            transition: 0.2s background-color ease;
        }
    </style>
    <script src="https://unpkg.com/vue@next"></script>
</head>
<body>
    <div id="app">
        <div class='movearea'
            :style="{ backgroundColor: `hsl(${x}, 80%, 50%)` }"
            @mousemove='xCoordinate'>
            <h3>Move your mouse across the screen...</h3>
            <br/>
            <p>x: {{x}}</p>
        </div>

    </div>

    <script>
        const AppComp={
            data() {
                return {
                    x: 0
                }
            },
            methods: {
                xCoordinate(e) {
                    this.x = e.clientX
                }
            }
        }

        const app = Vue.createApp(AppComp)
        const vm = app.mount("#app")
    </script>
</body>
</html>